package com.itshare.video.service;

import com.github.pagehelper.PageInfo;
import com.itshare.video.common.dto.QueryInfo;
import com.itshare.video.common.dto.Result;
import com.itshare.video.pojo.bo.AdvertisementDTO;
import com.itshare.video.pojo.bo.AdvertisementTimeChangeBO;
import com.itshare.video.pojo.bo.UpdateAdvertisementBO;
import com.itshare.video.pojo.dto.UserTokenDTO;
import com.itshare.video.pojo.po.Advertisement;
import com.itshare.video.pojo.query.AdvertisementQuery;
import com.itshare.video.pojo.vo.FrontAdvertisementVO;

import java.util.List;

/**
 * @Author lyr
 * @create 2020/11/4 21:13
 */
public interface AdvertisementService {

    /**
     * 申请添加一个 广告
     * @param advertisementDTO
     */
    void addAdvertisement(AdvertisementDTO advertisementDTO,UserTokenDTO userTokenDTO);


    /**
     * 保存或者插入一条数据
     * @param advertisement
     */
    void saveOrUpdateAdvertisement(Advertisement advertisement);



    /**
     * 获取 广告信息
     * @param userTokenDTO
     * @param queryInfo
     * @return
     */
    PageInfo<FrontAdvertisementVO> getAdvertisement(UserTokenDTO userTokenDTO, QueryInfo<AdvertisementQuery> queryInfo);
    PageInfo<Advertisement> getAdvertisementAllField(UserTokenDTO userTokenDTO, QueryInfo<AdvertisementQuery> queryInfo);

    /**
     * 逻辑删除
     * @param advertisementId
     */
    void logicDeleteAdvertisement(Integer advertisementId);



    Result<?> updateAdvertisementStatus(UpdateAdvertisementBO updateAdvertisementBO);


    /**
     * 更新时间和 修改广告位置
     * @param advertisementTimeChangeBO
     * @return
     */
    Result<?> updateRegionOrTime(AdvertisementTimeChangeBO advertisementTimeChangeBO);

}
